import request from '@/utils/request'
import qs from 'qs'

// 查询社区 department/page
export const getDept = params => {
  return request({
    url: '/department/page?' + qs.stringify(params),
    method: 'POST'
  })
}
// 新增社区 /department/save
export const getSave = params => {
  return request({
    url: '/department/save?' + qs.stringify(params),
    method: 'POST'
  })
}

// 修改状态 /department/switch
export const switchDept = params => {
  return request({
    url: '/department/switch?' + qs.stringify(params),
    method: 'POST'
  })
}

// 删除社区
export const deleteDept = params => {
  return request({
    url: '/department/delete?' + qs.stringify(params),
    method: 'POST'
  })
}

// /department/queryList 查询所有有效部门列表
export const queryList = params => {
  return request({
    url: '/department/queryList',
    method: 'POST'
  })
}
